program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;
var
  fin: textfile;
  massx1, massx2, massy1, massy2: array of integer;
  massa, massb, massc: array of integer;
  n, i, j, m, l, r, num: integer;
  flag: boolean;
  massk, massx, massy: array of Real;
begin
  assignfile(fin, 'input.txt');
  reset(fin);
  readln(fin, n);
  setlength(massx1, n);
  setlength(massx2, n);
  setlength(massy1, n);
  setlength(massy2, n);
  setlength(massa, n);
  setlength(massb, n);
  setlength(massc, n);
  setlength(massk, n);
  for i:= 0 to n-1 do
  begin
    read(fin, massx1[i]);
    read(fin, massy1[i]);
    read(fin, massx2[i]);
    readln(fin, massy2[i]);
  end;
  for i:= 0 to n-1 do
  begin
    massa[i]:=massy1[i]-massy2[i];
    massb[i]:=massx2[i]-massx1[i];
    massc[i]:=massx1[i]*massy2[i]-massx2[i]*massy1[i];
    if (massb[i]<>0) then
      massk[i]:=massa[i]/massb[i];
  end;
  m:=0;
  for i:=0 to n-1 do
  begin
    if (massa[i]<>0) and (massb[i]<>0) then
      for j:=0 to n-1 do
        if (j<>i) then
           if (massk[i]<>massk[j]) then
           begin
             setlength(massx, m+1);
             setlength(massy, m+1);
             massx[m]:=((massy1[j]-massy1[i])+(massk[j]*massx1[j]-massk[i]*massx1[i]))/(massk[j]-massk[i]);
             massy[m]:=massk[i]*(massx1[i]-massx[m])+massy1[i];
             m:=m+1;
           end;
  end;
  r:=0;
  for i:=0 to m do
  begin
    flag:=true;
    for j:=i+1 to m do
      if (abs(massx[i]-massx[j])<0.00001) and (abs(massy[i]-massy[j])<0.00001) then
      begin
        flag:=false;
        r:=r+1;
        break;
      end;
  end;
  num:=m-r;
  writeln(num);
  readln;
end.
